import datetime
from dataclasses import dataclass, field

from src.application.allowed_ip.dto.allowed_ip.allowed_ip import AllowedIpDTO
from src.application.common.dto import DTO
from src.application.order.enums import OrderPeriod, OrderType
from src.application.proxy.dto.proxy import ProxyDTO


@dataclass(frozen=True)
class OrderDTO(DTO):
    id: int
    buyer_id: int
    summ: float
    summ_total: float
    order_type: OrderType
    category_id: int
    period: OrderPeriod
    proxies: list[ProxyDTO]
    provider_id: int
    # was_created: datetime.datetime
    site_id: int | None = None
    expiring_on: datetime.datetime | None = None
